package com.constant;

/**
 * @FileName: EnumConstants
 * @Author: lb.
 * @CreateTime: 2022/9/23 下午15:25
 * @Version: v1.0
 * @description: 常量公共枚举类
 */
public class EnumConstants {

    /**
     * 淘宝
     * 订单号前缀
     * @return PrefixEnum
     */
    public enum PrefixEnum {
        TAOBAO_ORDER_SN("TB_");

        PrefixEnum(String title) {
            this.title = title;
        }
        private String title;

        public String getTitle() {
            return title;
        }
    }

    /**
     * 淘宝
     * 订单状态
     * @return OrderStateEnum
     */
    public enum OrderStateEnum{
        TRADE_NO_CREATE_PAY("TRADE_NO_CREATE_PAY"),//没有创建支付宝交易
        WAIT_BUYER_PAY("WAIT_BUYER_PAY"),//等待买家付款
        SELLER_CONSIGNED_PART("SELLER_CONSIGNED_PART"),//卖家部分发货
        WAIT_SELLER_SEND_GOODS("WAIT_SELLER_SEND_GOODS"),//等待卖家发货,即:买家已付款
        WAIT_BUYER_CONFIRM_GOODS("WAIT_BUYER_CONFIRM_GOODS"),//等待买家确认收货,即:卖家已发货
        TRADE_BUYER_SIGNED("TRADE_BUYER_SIGNED") ,//买家已签收,货到付款专用
        TRADE_FINISHED("TRADE_FINISHED") ,//交易成功
        TRADE_CLOSED("TRADE_CLOSED") ,//付款以后用户退款成功，交易自动关闭
        TRADE_CLOSED_BY_TAOBAO("TRADE_CLOSED_BY_TAOBAO") ,//付款以前，卖家或买家主动关闭交易
        PAY_PENDING("PAY_PENDING") ,//国际信用卡支付付款确认中
        WAIT_PRE_AUTH_CONFIRM("WAIT_PRE_AUTH_CONFIRM") , //0元购合约中
        PAID_FORBID_CONSIGN("PAID_FORBID_CONSIGN");//拼团中订单或者发货强管控的订单，已付款但禁止发货

        OrderStateEnum(String title) {
            this.title = title;
        }
        private String title;

        public String getTitle() {
            return title;
        }

    }

    /**
     * 淘宝
     * 退款退货状态
     * @return RefundsStateEnum
     */
    public enum RefundsStateEnum{
        WAIT_SELLER_AGREE("WAIT_SELLER_AGREE"),//买家已经申请退款，等待卖家同意
        WAIT_BUYER_RETURN_GOODS("WAIT_BUYER_RETURN_GOODS"),//卖家已经同意退款，等待买家退货
        WAIT_SELLER_CONFIRM_GOODS("WAIT_SELLER_CONFIRM_GOODS"),//买家已经退货，等待卖家确认收货
        SELLER_REFUSE_BUYER("SELLER_REFUSE_BUYER"),//卖家拒绝退款
        CLOSED("CLOSED"),//退款关闭
        SUCCESS("SUCCESS");//退款成功

        RefundsStateEnum(String title) {
            this.title = title;
        }
        private String title;

        public String getTitle() {
            return title;
        }

    }
    /**
     * 返回状态码
     * 淘宝换票流程
     * @return InvoiceChangeProcessEnum
     */
    public enum InvoiceChangeProcessEnum{
        PARAM_ERROR(1001,"参数错误"),
        PROCESS_END(1002,"业务流程结束"),
        CALL_THREE_INTERFACE_ERROR(1003,"调用三方接口失败"),
        BUSINESS_ERROR(1004,"业务操作错误"),
        SUCCESS(200,"成功"),
        ERROR(500,"错误");

        InvoiceChangeProcessEnum(int code,String title) {
            this.code = code;
            this.title = title;
        }
        private String title;

        private int code;

        public String getTitle() {
            return title;
        }

        public int getCode() {
            return code;
        }
    }
}
